<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var reg = /[0-9]+/g;
    var s = 'aa我今年119岁了,结过3次婚,有18个孩子';
    var r = s.match(reg);
    console.log(r);
</script>
</body>
</html>